package com.example.demo.study.objectextends;

public class PhoneTest {
    public static void main(String[] args) {
        // 创建一个手机对象
        Phone phone = new Phone();
        phone.call();
        phone.sendMessage();
        phone.incomingCall();

        System.out.println("--------------------");

        // 创建一个智能手机对象
        NewPhone newPhone = new NewPhone();
        newPhone.call();
        newPhone.sendMessage();
        newPhone.incomingCall();
    }
}
